<template>
  <div>
    <div
      class="item"
      v-for="(item, index) in list"
      :key="index"
    >
      <div class="item-title border-bottom">
        <span class="item-title-icon"></span>
        {{item.title}}
      </div>
      <detail-list class="item-children" v-if="item.children" :list="item.children"></detail-list>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}
</script>

<style scoped lang="stylus">
  .item-title
    line-height .8rem
    .item-title-icon
      display: inline-block;
      position relative
      top: .06rem;
      left: .2rem;
      margin-right .2rem
      width: .36rem;
      height: .36rem;
      background: url('http://s.qunarzz.com/piao/image/touch/sight/detail.png') 0 -.45rem no-repeat;
      background-size: .4rem 3rem;
  .item-children
    padding 0 .2rem
</style>
